<template>
  <div>
    <!-- <el-row> -->

      <div class="grid-content">
        <v-chart :options="chartOptions" :watchShallow="true" :auto-resize="true" :style="{ width: '100%', height: '100%' }" />
      </div>
    <!-- </el-row> -->
    <el-row>
      <div class="execution">
        <basic-container>
          <avue-crud ref="crud" :page.sync="page" :data="tableData"
            :table-loading="tableLoading" :option="tableOption" @on-load="getList" @search-change="searchChange"
            @refresh-change="refreshChange" @size-change="sizeChange" @current-change="currentChange">
          </avue-crud>
        </basic-container>
      </div>
    </el-row>
  </div>
</template>
<script>

import {fetchList, copy, addObj, putObj, delObj} from '@/api/asset/asset'
    //import {tableOption} from '@/const/crud/asset/asset'
    import { remote } from "@/api/admin/dict";
    import { roleCodeArray } from "@/api/admin/user";
    import store from '@/store'
    import { fetchTree, fetchList as fetchList1 } from '@/api/asset/assetcategory'
    import chooseMember from '@/components/chooseMember'
    import eventBus from '@/util/eventBus'
    import assetRecord from '@/views/asset/assetrecord/index'
    import { fetchTree as fetchTree1 } from '@/api/admin/sysarea'
    import { fetchList as fetchList2 } from '@/api/asset/assetmodel'
    import {mapGetters} from 'vuex'



const tableData =[
            {
                "assetId": "b68038983e6e7bd9402b5f0c217c5e8a",
                "categoryId": 5,
                "categoryType": 4,
				"catagoryType":"文物和陈列品",
                "modelId": null,
                "no": "00004",
                "pinyin": null,
                "name": "明代记录税收残页-测试",
                "brand": "国产",
                "spec": null,
                "unit": null,
                "sn": null,
                "rfid": null,
                "source": "6",
                "buyDate": "2022-03-15",
                "price": 4988.00,
                "areaId": 7,
                "areaName": "潭村办公楼01楼大厅A区",
                "address": "123",
                "timeLimit": 1,
                "expireDate": "2022-04-15",
                "remark": null,
                "cover": null,
                "status": "1",
                "bizStatus": "5",
                "enableStatus": "1",
                "attachment": null,
                "createId": 23,
                "createName": null,
                "createRealname": "杨丽",
                "createDeptId": 1,
                "createDeptName": "广州税务",
                "useId": 1,
                "useName": "admin",
                "useRealname": "管理员",
                "useDeptId": 1,
                "useDeptName": "广州税务",
                "handleId": null,
                "handleName": null,
                "handleRealname": null,
                "createTime": "2022-03-15 09:18:32",
                "updateTime": "2022-03-23 10:58:55",
                "delFlag": null,
                "tenantId": null,
                "maintenanceId": "baefe40e4c7e6ff1bf06833c36ea7684",
                "supplier": "国产",
                "contact": null,
                "phone": null,
                "maintenanceExpireDate": null,
                "maintenanceRemark": null,
                "maintenanceHandleId": null,
                "maintenanceHandleName": null,
                "maintenanceHandleRealname": null
            },
            {
                "assetId": "354121676c51102cdc53a746f725af88",
                "categoryId": 3,
                "categoryType": 6,
				"catagoryType":"家具、用具、装具、及动植物",
                "modelId": null,
                "no": "00003",
                "pinyin": null,
                "name": "打印机-01",
                "brand": "惠普",
                "spec": null,
                "unit": "台",
                "sn": null,
                "rfid": null,
                "source": "1",
                "buyDate": "2022-03-16",
                "price": 899.00,
                "areaId": 7,
                "areaName": null,
                "address": null,
                "timeLimit": 9999,
                "expireDate": "2022-04-15",
                "remark": null,
                "cover": null,
                "status": "6",
                "bizStatus": "6",
                "enableStatus": "1",
                "attachment": null,
                "createId": 23,
                "createName": null,
                "createRealname": "杨丽",
                "createDeptId": 1,
                "createDeptName": "广州税务",
                "useId": null,
                "useName": null,
                "useRealname": null,
                "useDeptId": null,
                "useDeptName": null,
                "handleId": null,
                "handleName": null,
                "handleRealname": null,
                "createTime": "2022-03-15 09:12:48",
                "updateTime": "2022-03-16 10:15:03",
                "delFlag": null,
                "tenantId": null,
                "maintenanceId": "9dcea6277db9f866d7d74fd177a49051",
                "supplier": "惠普",
                "contact": null,
                "phone": null,
                "maintenanceExpireDate": null,
                "maintenanceRemark": null,
                "maintenanceHandleId": null,
                "maintenanceHandleName": null,
                "maintenanceHandleRealname": null
            },
            {
                "assetId": "8556f4a12b35230d2ecda8e6d85c14a4",
				"catagoryType":"土地房屋及构筑物",
                "categoryId": 2,
                "categoryType": 1,
                "modelId": null,
                "no": "00002",
                "pinyin": null,
                "name": "公寓1308房间",
                "brand": null,
                "spec": null,
                "unit": null,
                "sn": null,
                "rfid": null,
                "source": "1",
                "buyDate": "2022-03-14",
                "price": 150000.00,
                "areaId": 14,
                "areaName": null,
                "address": null,
                "timeLimit": 1,
                "expireDate": "2022-04-14",
                "remark": null,
                "cover": null,
                "status": "0",
                "bizStatus": "1",
                "enableStatus": "1",
                "attachment": null,
                "createId": 43,
                "createName": null,
                "createRealname": "servicem1",
                "createDeptId": 2,
                "createDeptName": "机关服务中心",
                "useId": null,
                "useName": null,
                "useRealname": null,
                "useDeptId": null,
                "useDeptName": null,
                "handleId": 5,
                "handleName": null,
                "handleRealname": "服务经办人",
                "createTime": "2022-03-14 11:40:20",
                "updateTime": "2022-03-14 11:41:52",
                "delFlag": null,
                "tenantId": null,
                "maintenanceId": "a41b6c7970f377996faeef974d340de9",
                "supplier": "碧桂园",
                "contact": null,
                "phone": null,
                "maintenanceExpireDate": null,
                "maintenanceRemark": null,
                "maintenanceHandleId": null,
                "maintenanceHandleName": null,
                "maintenanceHandleRealname": null
            }
        ]









  const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "dialogClickModal": false,
  "searchMenuSpan": 6,
  menu:false,
  addBtn:false,
      editBtn:false,
      viewBtn:false,
      delBtn:false,
  labelWidth: 150,
  "column": [
	  {
      "type": "input",
      "label": "编号",
      "prop": "assetId",
      "span": 12,
      hide: true,
      addDisplay: false,
      editDisplay: false
    },	  {
      "type": "select",
      "label": "状态",
      search: true,
      "prop": "status",
      value: '0',
      dicUrl: '/admin/dict/type/asset_use_status',
      "span": 12
    },	  {
      "type": "select",
      "label": "业务状态",
      search: true,
      "prop": "bizStatus",
      addDisplay: false,
      editDisplay: false,
      value: '0',
      dicUrl: '/admin/dict/type/asset_record_method',
      "span": 12
    },	  {
      "type": "select",
      "label": "类别",
      "prop": "categoryId",
      "span": 12,
      hide:true
    },{
      "type": "select",
      "label": "类别",
      "prop": "categoryType",
      "span": 12,
      searchLabelWidth: 150,
      search: true,
      dicData:[
          {
            label: '土地房屋及构筑物',
            value: 1
            },{
            label: '通用设备',
            value: 2
          },
          {
            label: '专用设备',
            value: 3
            },{
            label: '文物和陈列品',
            value: 4
          },{
            label: '图书档案',
            value: 5
          },{
            label: '家具、用具、装具、及动植物',
            value: 6
          }
      ]
    },	  {
      "type": "input",
      "label": "编码",
      "prop": "no",
      "span": 12
    // },	  {
    //   "type": "input",
    //   "label": "拼音缩写",
    //   "prop": "pinyin",
    //   "span": 12
    },	  {
      "type": "input",
      "label": "名称",
      "prop": "name",
      search: true,
      "span": 12
    },	  {
      "type": "input",
      "label": "标准型号",
      "prop": "modelId",
      hide: true,
      showColumn:false,
      "span": 12,
      dicUrl: '/act/assetmodel/page?size=-1',
      props: {
        label: 'name',
        value:'modelId',
        res: "data.records"
      },
      addDisplay: false,
      editDisplay: false
    },	  {
      "type": "input",
      "label": "品牌",
      "prop": "brand",
      "span": 12
    },	  {
      "type": "input",
      "label": "规格",
      "prop": "spec",
      "span": 12
    },	  {
      "type": "input",
      "label": "单位",
      "prop": "unit",
      "span": 12
    },	  {
      "type": "input",
      "label": "sn号",
      "prop": "sn",
      "span": 12
    },	  {
      "type": "input",
      "label": "RFID",
      "prop": "rfid",
      "span": 12
    },	  {
      "type": "select",
      "label": "来源",
      "prop": "source",
      dicUrl: '/admin/dict/type/asset_source',
      "span": 12
    },	  {
      "type": "input",
      "label": "购入日期",
      "prop": "buyDate",
      width: 100,
      "span": 12
    },	  {
      "type": "input",
      "label": "金额",
      "prop": "price",
      "span": 12
    },	  {
      "type": "select",
      "label": "区域",
      "prop": "areaId",
      dicUrl: '/admin/sysarea/page?size=-1',
      props: {
        label: 'name',
        value:'areaId',
        res: "data.records"
      },
      "span": 12
    },	  {
      "type": "input",
      "label": "存放地点",
      "prop": "address",
      "span": 12,
      hide: true,
    },	  {
      "type": "input",
      "label": "使用期限（月）",
      "prop": "timeLimit",
      width: 120,
      "span": 12
    },	  {
      "type": "input",
      "label": "备注",
      "prop": "remark",
      hide: true,
      "span": 24
    },	  {
      type: 'upload',
      span: 24,
      loadText: '附件上传中，请稍等',
      listType:'picture-img',
      accept: ["image/png","image/jpeg","image/jpg"],
      tip: '只能上传jpg，png图片不超过20MB',
      fileSize: 20480,
      propsHttp: {
          res: 'data'
      },
      canvasOption: {
        text: ' ',
        ratio: 0.1
      },
      hide: true,
      action: "/act/file/upload",
      "label": "图片",
      "prop": "cover"
    },	  {
      "type": "input",
      "label": "附件",
      "prop": "attachment",
      hide: true,
      showColumn:false,
      "span": 12
    },	  {
      "type": "input",
      "label": "录入人",
      "prop": "createRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "创建部门名称",
      "prop": "createDeptName",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "使用用户名称",
      "prop": "useRealname",
      "span": 12,
      search: true,
      searchLabelWidth: 150,
    },	  {
      "type": "input",
      "label": "使用部门名称",
      "prop": "useDeptName",
      "span": 12,
      search: true,
      searchLabelWidth: 150,
    },	  {
      "type": "input",
      "label": "管理员名称",
      "prop": "handleRealname",
      "span": 12,
      searchLabelWidth: 150,
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "更新时间",
      "prop": "updateTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "供应商",
      "prop": "supplier",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系人",
      "prop": "contact",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系方式",
      "prop": "phone",
      "span": 12
    },	  {
      "type": "input",
      "label": "负责人",
      "prop": "maintenanceHandleRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "维保到期",
      "prop": "maintenanceExpireDate",
      width: 100,
      "span": 12
    },	  {
      "type": "input",
      "label": "维保说明",
      "prop": "maintenanceRemark",
      hide: true,
      "span": 12
    }  ]
}

export default {
  name: 'dataanalysis',
  method1s: {
            deleteImg() {
                this.avatarUrl = ''
                this.assetData.cover = ''
            },
            recordForm (scope) {
                this.assetId = scope.row.assetId
                this.modal1 = true
            },
            closeDialog1() {
                this.dialogVisible = false
                this.assetData = {}
            },
            download(file) {
                window.open(file.response.data.url)
            },
            copyForm(scope) {
                this.$prompt('请输入数量', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    inputPattern:/^([1-9]{1})$/,
                    inputErrorMessage: '数量范围为1-9'
                }).then(({ value }) => {
                    copy({assetId:scope.row.assetId, number: Number(value)}).then(response => {
                        this.$message.success('复制成功')
                        this.getList(this.page)
                    })
                })
            },
            alarmHandle(formName) {
                const _this = this
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                         this.$refs['assetData1'].validate((valid1) => {
                            if (valid1) {
                                if (!_this.editFlag) {
                                    addObj(_this.assetData).then(data => {
                                        _this.$message.success('添加成功')
                                        _this.closeDialog1()
                                        _this.getList(_this.page)
                                    })
                                } else {
                                    putObj(_this.assetData).then(data => {
                                        _this.$message.success('编辑成功')
                                        _this.closeDialog1()
                                        _this.getList(_this.page)
                                    })
                                }
                            }
                         })
                    }
                })
            },
            eventBusHandle () {
                let _this = this
                eventBus.$on('getMember', function (data) {
                    if (data.useId_choose_member) {
                        _this.assetData.useId = data.useId[0].userId
                        _this.assetData.useRealname = data.useId[0].realname
                        _this.assetData.useDeptName = data.useId[0].deptName
                        _this.assetData.useDeptId = data.useId[0].deptId
                        _this.useId_str = data.useId_choose_member
                    } else if (data.handleId_choose_member) {
                        _this.assetData.handleId = data.handleId[0].userId
                        _this.assetData.handleRealname = data.handleId[0].realname
                        _this.handleId_str = data.handleId_choose_member
                    } else if (data.maintenanceHandleId_choose_member) {
                        _this.assetData.maintenanceHandleId = data.maintenanceHandleId[0].userId
                        _this.assetData.maintenanceHandleRealname = data.maintenanceHandleId[0].realname
                        _this.maintenanceHandleId_str = data.maintenanceHandleId_choose_member
                    }
                })
            },
            choseMember (id) {
                this.type = "radio"
                this.labelkey = id + '_choose_member'
                this.url1 = '/admin/dept/tree'
                this.url2 = '/admin/user/page/simple'
                this.title1 = '组织机构'
                this.flKey = 'deptId'
                this.columns = [
                {
                    title: '用户名',
                    dataIndex: 'username',
                    key: 'username',
                },
                {
                    title: '姓名',
                    key: 'realname',
                    dataIndex: 'realname',
                },
                {
                    title: '所属部门',
                    dataIndex: 'deptId',
                    key:'deptId',
                    scopedSlots: { customRender: 'deptId' },
                },
                {
                    title: '岗位',
                    dataIndex: 'post',
                    key: 'post',
                    scopedSlots: { customRender: 'post' }
                }
                ]
                this.columns1 = [
                {
                    title: '用户名',
                    dataIndex: 'username',
                    key: 'username' 
                },
                {
                    title: '操作',
                    key: 'action',
                    scopedSlots: { customRender: 'action' },
                },
                ]
                this.showChose = true
            },
            changeAdmin(value) {
                let list = this.optionsGly.filter(item => {
                    return item.userId === value
                })[0]
                this.assetData.handleId = list.userId
                this.assetData.handleRealname = list.realname
            },
            init() {
                fetchTree({status: 1}).then(response => {
                    this.treeData = response.data.data
                })
                fetchList1({current: 1, size:1000}).then(response => {
                    this.flList = response.data.data.records
                })
                this.getModel()
                // 资产来源
                remote('asset_source').then(response => {
                    this.optionsLy = response.data.data
                })
                // 资产状态
                remote('asset_use_status').then(response => {
                    this.optionsZt = response.data.data
                })
                // 管理员
                roleCodeArray(['ROLE_SERVICE_ASSET_HANDEL']).then(response => {
                    this.optionsGly = response.data.data
                })
                fetchTree1().then(response => {
                    this.treeData1 = response.data.data
                })
            },
            getModel(params) {
                fetchList2(Object.assign({
                    current: 1,
                    size:1000,
                    status: '1'
                }, params)).then(response => {
                    this.optionsXh = response.data.data.records
                })
            },
            changeCategory(value) {
                this.getModel({categoryId: value})
                this.assetData.timeLimit = this.flList.filter(item => {
                    return item.categoryId === value
                })[0].timeLimit
            },
            handleAvatarSuccess(res, file, fileList) {
                this.avatarUrl = URL.createObjectURL(file.raw)
                this.assetData.cover = res.data.url
                this.keyNum += 1
            },
            handleSuccess(response, file, fileList) {
                this.assetData.attachment = JSON.stringify(fileList)
            },
            handleRemove(file, fileList) {
                this.assetData.attachment = JSON.stringify(fileList)
            },
            changeModel(value) {
                let modelForm = this.optionsXh.filter(item => {
                    return item.modelId === value
                })
                if (modelForm.length > 0) {
                    this.canEdit = false
                    this.assetData.categoryId = modelForm[0].categoryId
                    this.assetData.name = modelForm[0].name
                    this.assetData.spec = modelForm[0].spec
                    this.assetData.unit = modelForm[0].unit
                    this.assetData.price = modelForm[0].value
                    this.assetData.brand = modelForm[0].brand
                    this.assetData.cover = modelForm[0].cover
                    this.avatarUrl = modelForm[0].cover
                    this.assetData.timeLimit = this.flList.filter(item => {
                        return item.categoryId === modelForm[0].categoryId
                    })[0].timeLimit
                    // this.alarmHandle('assetData')
                } else {
                    this.assetData.categoryId = ''
                    this.assetData.name = ''
                    this.assetData.unit = ''
                    this.assetData.spec = ''
                    this.assetData.price = ''
                    this.assetData.brand = ''
                    this.assetData.cover = ''
                    this.avatarUrl = ''
                    this.assetData.timeLimit = ''
                    this.canEdit = true
                }
            },
            listenEvent() {
                let _this = this
                document.addEventListener("keydown", function (event) {
                    if (event.keyCode == 8 || event.keyCode == 46) {//backspace 或 delete键
                        if(event.target.id === 'maintenanceHandle_input') {
                            _this.maintenanceHandleId_str = ''
                            _this.assetData.maintenanceHandleId = ''
                            _this.assetData.maintenanceHandleRealname = ''
                        } else if(event.target.id === 'user_input') {
                            _this.assetData.useId = ''
                            _this.assetData.useRealname = ''
                            _this.assetData.useDeptName = ''
                            _this.useId_str = ''
                        }
                    }
                })
            },
            addForm(){
                this.title2 = '新增资产'
                this.useId_str = ''
                this.maintenanceHandleId_str = ''
                this.fileList = []
                this.editFlag = false
                this.canEdit = true
                this.dialogVisible = true
            },
            editForm(scope) {
                this.title2 = '编辑资产'
                this.editFlag = true
                if(scope.row.modelId) {
                    this.canEdit = false
                } else {
                    this.canEdit = true
                }
                this.fileList = JSON.parse(scope.row.attachment) || []
                this.assetData = Object.assign({}, scope.row)
                this.useId_str = scope.row.useRealname
                this.handleId_str = scope.row.handleRealname
                this.maintenanceHandleId_str = scope.row.maintenanceHandleRealname
                this.avatarUrl = scope.row.cover
                this.dialogVisible = true
            },
            nodeClick(data) {
                this.page.currentPage = 1
                this.categoryId = data.id
                this.getList(this.page, {categoryId: data.id})
            },
            getFlName(id) {
                let list =  this.flList.filter(item => {
                    return item.categoryId === id
                })
                return list.length > 0 ? list[0].name : ''
            },
            getType(data) {
                this.form.type = data.type
            },
            getList(page, params) {
                this.tableLoading = true
                let att = {
                    current: page.currentPage,
                    size: page.pageSize
                }
                if (this.areaId) {
                    att.areaId = this.areaId
                }
                fetchList(Object.assign(att, params, this.searchForm, {categoryId: this.categoryId} )).then(response => {
                    this.tableData = response.data.data.records
                    this.page.total = response.data.data.total
                    this.tableLoading = false
                }).catch(() => {
                    this.tableLoading=false
                })
            },
            rowDel: function (row, index) {
                this.$confirm('是否确认删除?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(function () {
                    return delObj(row.assetId)
                }).then(data => {
                    this.$message.success('删除成功')
                    this.getList(this.page)
                })
            },
            handleUpdate: function (row, index, done,loading) {
                putObj(row).then(data => {
                    this.$message.success('修改成功')
                    done()
                    this.getList(this.page)
                }).catch(() => {
                    loading();
                });
            },
            handleSave: function (row, done,loading) {
                addObj(row).then(data => {
                    this.$message.success('添加成功')
                    done()
                    this.getList(this.page)
                }).catch(() => {
                    loading();
                });
            },
            sizeChange(pageSize){
                this.page.pageSize = pageSize
            },
            currentChange(current){
                this.page.currentPage = current
            },
            searchChange(form, done) {
                this.searchForm = form
                this.page.currentPage = 1
                this.getList(this.page, form)
                done()
            },
            refreshChange() {
                this.getList(this.page)
            }
        },
  data() {
    return {
      chartOptions: {
        title: {
          text: '资产数据分析',
        },
        tooltip: {
          trigger: 'axis',
        },
        legend: {
          data: ['土地房屋及构筑物', '通用设备', '专用设备'], // 根据实际分类修改
        },
        xAxis: {
          type: 'category',
          boundaryGap: false,
          data: ['2023-01', '2023-02', '2023-03', '2023-04', '2023-05', '2023-06','2023-07', '2023-08', '2023-09', '2023-10', '2023-11', '2023-12'], // 月份数据，根据实际需要修改
        },
        yAxis: {
          type: 'value',
        },
        series: [
          {
            name: '土地房屋及构筑物',
            type: 'line',
            data: [120, 132, 101, 134, 90, 230,245, 300, 299, 134, 570, 278], // 类别1 的数据，根据实际数据修改
          },
          {
            name: '通用设备',
            type: 'line',
            data: [220, 182, 191, 234, 290, 330,230,245, 300, 299, 134, 570], // 类别2 的数据，根据实际数据修改
          },
          {
            name: '专用设备',
            type: 'line',
            data: [150, 232, 201, 154, 190, 330,101, 134, 90, 230,245, 300], // 类别3 的数据，根据实际数据修改
          },
        ],
      },
      searchForm: {},
      tableData: [],
      defaultProps: {
        label: 'name',
        value: 'id'
      },
      categoryId: '',
      assetId: '',
      modal1: false,
      maintenanceHandleId_str: '',
      handleId_str: '',
      useId_str: '',
      avatarUrl: '',
      fileList: [],
      canEdit: true,
      cProps: {
        label: 'name',
        value: 'id',
        emitPath: false,
        checkStrictly: true
      },
      rules: {
        categoryId: [
          { required: true, message: '请选择资产类别' }
        ],
        no: [
          { required: true, message: '请输入资产编码', trigger: 'blur' },
        ],
        name: [
          { required: true, message: '请输入资产名称', trigger: 'blur' }
        ],
        supplier: [
          { required: true, message: '请输入供应商', trigger: 'blur' }
        ],
        price: [
          { required: true, message: '请输入金额', trigger: 'blur' },
        ],
        buyDate: [
          { required: true, message: '请选择购入日期' }
        ],
        areaId: [
          { required: true, message: '请选择区域' }
        ]
      },
      aProps: {
        label: 'name',
        value: 'id',
        emitPath: false,
        checkStrictly: true
      },
      optionsXh: [],
      optionsLy: [],
      optionsZt: [],
      optionsGly: [],
      options: [{
      }],
      assetData: {
        status: '0'
      },
      wbData: {},
      dialogVisible: false,
      treeOption: {
        nodeKey: 'id',
        addBtn: false,
        menu: false,
        props: {
          label: 'name',
          value: 'id'
        }
      },
      flKey: '',
      url1: '',
      url2: '',
      type: '',
      columns: [],
      columns1: [],
      title1: '',
      title2: '',
      withMember_str: '',
      labelkey: '',
      showChose: false,
      editFlag: false,
      keyNum: 0,
      form: {},
      form1: {},
      flList: [],
      treeData: [],
      treeData1: [],
      page: {
        total: 0, // 总页数
        currentPage: 1, // 当前页数
        pageSize: 20 // 每页显示多少条
      },
      tableLoading: false,
      tableOption: tableOption,
      tableData:tableData,
      addBtn:false,
      editBtn:false,
      viewBtn:false,
    
    }
  }
};
</script>
<style lang="scss" scoped>
.grid-content {
  height: 50vh;
  margin-top: 20px;
}

.table-sty {
  margin: 20px;
}
</style>
